//#include <jni.h>
//#include <string>
//
//extern "C" JNIEXPORT jstring JNICALL
//Java_com_example_nativelib_NativeLib_stringFromJNI(
//        JNIEnv* env,
//        jobject /* this */) {
//    std::string hello = "Hello from C++";
//    return env->NewStringUTF(hello.c_str());
//}
//extern "C"
//JNIEXPORT void JNICALL
//Java_com_example_nativelib_HelloNative_sayHello(JNIEnv *env, jobject thiz) {
//    std::string hello = "Hello from C++";
//}

#include <jni.h>
#include <string>
#include <android/log.h>

#define LOG_TAG "native-lib"
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)

extern "C" JNIEXPORT void JNICALL
Java_com_example_myapp_MainActivity_myPrint(JNIEnv *env, jobject, jstring message) {
    const char *nativeMessage = env->GetStringUTFChars(message, 0);
    LOGI("%s", nativeMessage);
    env->ReleaseStringUTFChars(message, nativeMessage);
}